package zzg.study.protocol.request;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import zzg.study.protocol.Packet;

import static zzg.study.protocol.command.Command.MESSAGE_REQUEST;

/**
 * @Classname MessageRequestPacket
 * @Description 消息请求，客户端发向服务端的消息对象
 * @Date 2023/11/30 21:29
 * @Author zhuzhenguo
 */

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class MessageRequestPacket extends Packet {

    private String toUserId;
    private String message;

    public MessageRequestPacket(String toUserId, String message) {
        this.toUserId = toUserId;
        this.message = message;
    }

    @Override
    public Byte getCommand() {
        return MESSAGE_REQUEST;
    }
}
